import Resources from "../common/Resources"

class LevelManager {
    private levels: any[] = null

    public static curLevel = 1

    public async init() {
        let levels = await Resources.load('levels')
        this.levels = (levels as cc.JsonAsset).json
    }

    public level(level: number) {
        return this.levels[level]
    }
}

const levelManager = new LevelManager()
export { LevelManager, levelManager }
